public class Monster {
    //生命值
    private int life;
    //等级
    private int garde;
    //姓名
    private String mName;
    //构造方法
    public Monster() {}
    public Monster(String mName,int grade) {
        this.mName = mName;
        this.garde = grade;
        //生命值等于等级乘1000
        this.life = grade*1000;
    }
    //修改怪兽生命值
    public void setLife(int power) {
        this.life -= power;
    }
    //获取怪兽生命值的方法
    public int getLife() {
        return this.life;
    }
    //获取怪兽名字
    public String getmName() {
        return this.mName;
    }
}
